export const FONT_SIZE = [
    6, 8, 10, 12, 14, 16, 18, 21, 24, 28, 32, 36, 42, 48, 56, 64, 72, 80, 88, 96, 104, 120, 144,
];

export const FONT_SIZE_OPTIONS = FONT_SIZE.map(item => ({ value: item, label: item }));

export const FONT_FAMILY_OPTIONS = [
    { value: "TimesNewRoman", label: "TimesNewRoman", },
    { value: "宋体", label: "宋体", },
    { value: "kaiti", label: "楷体", },
];

const ROTATE_SVG = `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>编组 14</title><g id="数据引擎" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="11搜索图-编辑选中图层" transform="translate(-816, -128)"><g id="编组-13" transform="translate(367, 128)"><g id="编组-14" transform="translate(449, 0)"><circle id="椭圆形备份-8" fill="#FFFFFF" cx="14" cy="14" r="14"></circle><g id="编组" transform="translate(8, 8)" stroke="#60656E" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.125"><line x1="12.8243243" y1="0.702702703" x2="12.8243243" y2="6.32432432" id="路径"></line><line x1="0.175675676" y1="6.32432432" x2="0.175675676" y2="11.9459459" id="路径"></line><path d="M12.8243243,6.32432432 C12.8243243,2.83150541 9.99281892,0 6.5,0 C4.7132027,0 3.09948108,0.740985946 1.94933243,1.93243243 M0.175675676,6.32432432 C0.175675676,9.81714324 3.00718108,12.6486486 6.5,12.6486486 C8.20602162,12.6486486 9.75428649,11.9731405 10.8918919,10.8749919" id="形状"></path></g></g></g></g></g></svg>')}`;
export const ROTATE_IMG = document.createElement('img');
ROTATE_IMG.src = ROTATE_SVG;

export const DEFAULT_TEXT_CONFIG = {
    fill: "#ff0000",
    fontFamily: FONT_FAMILY_OPTIONS?.[0]?.value,
    fontSize: 42,
}

export const OBJECT_ID = {
    TEXT: "text",
    BG: "background_img",
    SKETCH: "sketch_rect",
    CROP: "crop_rect",
};

